import { AdvancedAdditionalButton } from "./AdvancedButton";
import { AdvancedButtonIconBadge } from "./AdvancedButtonIconBadge";
import { iconMap } from "./icons";

export const AdvancedButtonIcon = (props: AdvancedAdditionalButton) => {
  const { icon, iconCount, iconNewCount, iconColor = 'inherit', iconSize } = props;

  if (!icon) return null;

  const Icon = iconMap[icon];

  return <span className={`${iconColor || ''} relative flex justify-center items-center transition`} >
    <Icon size={iconSize} color={iconColor} />
    <AdvancedButtonIconBadge iconCount={iconCount} iconNewCount={iconNewCount} />
  </span >
}